<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<script type="text/javascript">
	window.top.$('#display_center_id').css('display','none');
</script>
<script>
    function change_color_over(title_id){
    	$("#"+title_id).css('color',"blue");
    }
    function change_color_out(title_id){
    	$("#"+title_id).css('color',"black");
    }
</script>
<div class="pad-lr-10">
<div id="searchid" style="">
<form name="searchform" action="" method="get" >
<input type="hidden" value="<?php echo ROUTE_M;?>" name="m">
<input type="hidden" value="<?php echo ROUTE_C;?>" name="c">
<input type="hidden" value="<?php echo ROUTE_A;?>" name="a">
<input type="hidden" value="1" name="search">
<input type="hidden" value="<?=$num?>" name="num">
<input type="hidden" value="<?php echo $pc_hash;?>" name="pc_hash">
<table width="100%" cellspacing="0" class="search-form">
    <tbody>
		<tr>
		<td>
		<div class="explain-col">
				
				<?php echo L('title');?>：<input name="title" type="text" value="<?php echo $_GET['title']?>" class="input-text" />
				<?php echo L('type')?>：
				<select name="catid" >
				<option value="0">请选择</option>
				<?php echo $select_categorys;?>
				</select>
				<!--<?php echo L('contestName')?>：
				<select name="contest_id" >
				<option value="0">请选择</option>
				<?php echo $categorys;?>
				</select>-->
				<input type="submit" name="search" class="button" value="<?php echo L('search');?>" />
	</div>
	<!-- <div class="explain-col" style="margin-top:5px;">
		绑定栏目：<?php echo form::select_category('category_content_'.$this->siteid,'','name="cate_id" id="cate_id"','请选择',0,-1);?>
				<a href="javascript:;" class="button" onclick="ajaxRelease(2);">发布</a>
	</div> -->
		</td>
		</tr>
    </tbody>
</table>
</form>
</div>
<form name="myform" action="?m=video&c=manage&a=deleteAll&dosubmit=1" method="post" onsubmit="return confirm('<?php echo L('manage_info_delete')?>')">
<div class="table-list">
<table width="100%" cellspacing="0">
	<thead>
		<tr>
			<th  align="center" width="20"><input type="checkbox" value="" id="check_box" onclick="selectall('ids[]');"></th>
			<th align="center" width="50">ID</th>
			<th align="center" width="120"><?php echo L('title')?></th>
			<th align="center" width="120"><?php echo L('image_cover')?></th>
			<th align="center" width="100"><?php echo L('type')?></th>
			<!-- <th align="left" width="100"><?php echo L('contestName')?></th> -->
			<th align="center" width="120"><?php echo L('create_time')?></th>
			<th align="center" width="80"><?php echo L('create_name')?></th>
			<th align="center" width="100"><?php echo L('operations_manage')?></th>
		</tr>
	</thead>
<tbody>
<?php
if (!empty($video_list)){
	foreach($video_list as $k=>$v) {
?>
    <tr>
		<td align="center"><input type="checkbox" value="<?php echo $v['id']?>" name="ids[]"></td>
		<td align="center"><?php echo $v['id']?></td>
		<td align="center"><a href="/index.php?m=contest&c=index&a=videoshow&id=<?php echo $v['id']?>"  id="title_<?php echo $v['id'];?>" target="_blank"  onmouseover="change_color_over('title_'+<?php echo $v['id'];?>)" onmouseout="change_color_out('title_'+<?php echo $v['id'];?>)" title="点击可预览：<?php echo $v['title'];?>视频"><?php echo $v['title']?></a></td>
		<td align="center"><?php if ($v['image_cover']){ ?><img src="<?php echo $v['image_cover'];?>" width="80"/><?php }else{echo '<font color="red">（未设置）</font>';}?></td>
		<td align="center"><?php echo $v['typeName']?$v['typeName']:'<font color="red">（未设置）</font>';?></td>
		<!-- <td align="left"><?php echo $v['contestName']?$v['contestName']:'<font color="red">（未设置）</font>';?></td> -->
		<td align="center"><?php echo $v['create_time'];?></td>
		<td align="center"><?php echo $adminInfo[$v['updated_by']];?></td>
		<td align="center">
			<a href="?m=video&c=manage&a=edit&id=<?php echo $v['id']?>" title="<?php echo L('edit')?>"><?php echo L('edit')?></a> | 
			<a href="?m=video&c=manage&a=delete&id=<?php echo $v['id']?>" onClick="return confirm('确认要删除[<?php echo $v['title']?>]？')"><?php echo L('delete')?></a>
			<!-- <a href="?m=video&c=manage&a=show&id=<?php echo $v['id']?>&source_type=2"><?php echo L('show')?></a> -->
		</td>
    </tr>
<?php
	}
}else{
	echo "<tr><td colspan='8' style='color:red;font-size:18px;text-align:center;'><span>暂无数据！</span></td></tr>";
}
?>
</tbody>
</table>

<div class="btn">
<label for="check_box"><?php echo L('select_all')?>/<?php echo L('cancel')?></label> <input type="submit" class="button" name="dosubmit" value="<?php echo L('delete')?>"/>
<!-- <input type="button" class="button" value="--><?php //echo L('import_collection_points')?><!--" onclick="import_spider()" />-->
每页条数：
<select onchange="window.location='?m=<?php echo ROUTE_M;?>&c=<?php echo ROUTE_C;?>&a=<?php echo ROUTE_A;?>&pc_hash=<?php echo $_SESSION['pc_hash'];?>&num='+this.value">
	<option value="10" <?php if($num == 10){?>selected<?php }?> >10</option>
	<option value="15" <?php if($num == 15){?>selected<?php }?> >15</option>
	<option value="20" <?php if($num == 20){?>selected<?php }?> >20</option>
	<option value="30" <?php if($num == 30){?>selected<?php }?> >30</option>
	<option value="50" <?php if($num == 50){?>selected<?php }?> >50</option>
</select>
</div>

<div id="pages"><?php echo $pages?></div>
</div>
</form>
</div>
<script type="text/javascript">
	function edit(id, name) {
		window.top.art.dialog({id:'edit'}).close();
		window.top.art.dialog({title:'<?php echo L('edit')?> '+name+' ',id:'edit',iframe:'?m=video&c=manage&a=edit&id='+id,width:'700',height:'350'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
	}
</script>
</body>
</html>